using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._Analysis
{
    /// <summary>
    /// <para>Add Vehicle Routing Problem Routes</para>
    /// <para>Creates routes in a Vehicle Routing Problem (VRP) layer. This tool will append rows to the Routes sublayer and can add rows with specific settings while creating a unique name field.</para>
    /// <para>在车辆配送配送问题 （VRP） 图层中创建路径。此工具会将行追加到 Routes 子图层，并可在创建唯一名称字段时添加具有特定设置的行。</para>
    /// </summary>    
    [DisplayName("Add Vehicle Routing Problem Routes")]
    public class AddVehicleRoutingProblemRoutes : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddVehicleRoutingProblemRoutes()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_vrp_layer">
        /// <para>Input Vehicle Routing Problem Layer</para>
        /// <para>The  vehicle routing problem analysis layer to which routes will be added.</para>
        /// <para>将向其添加路径的车辆路径问题分析图层。</para>
        /// </param>
        /// <param name="_number_of_routes">
        /// <para>Number of Routes</para>
        /// <para>The number of routes to add.</para>
        /// <para>要添加的路由数。</para>
        /// </param>
        /// <param name="_route_name_prefix">
        /// <para>Route Name Prefix</para>
        /// <para>A qualifier added to the title of every route layer item. For example, a route name prefix WeekdayRoute would be used as the starting text for every route’s name with Object ID appended to it.</para>
        /// <para>添加到每个路径图层项目标题中的限定符。例如，路由名称前缀 WeekdayRoute 将用作每个路由名称的起始文本，并在其后追加对象 ID。</para>
        /// </param>
        public AddVehicleRoutingProblemRoutes(object _in_vrp_layer, long? _number_of_routes, object _route_name_prefix)
        {
            this._in_vrp_layer = _in_vrp_layer;
            this._number_of_routes = _number_of_routes;
            this._route_name_prefix = _route_name_prefix;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Add Vehicle Routing Problem Routes";

        public override string CallName => "na.AddVehicleRoutingProblemRoutes";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_vrp_layer, _number_of_routes, _route_name_prefix, _start_depot_name, _end_depot_name, _earliest_start_time, _latest_start_time, _max_order_count, _capacities, _route_constraints, _costs, _additional_route_time, _append_to_existing_routes.GetGPValue(), _out_vrp_layer];

        /// <summary>
        /// <para>Input Vehicle Routing Problem Layer</para>
        /// <para>The  vehicle routing problem analysis layer to which routes will be added.</para>
        /// <para>将向其添加路径的车辆路径问题分析图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Vehicle Routing Problem Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_vrp_layer { get; set; }


        /// <summary>
        /// <para>Number of Routes</para>
        /// <para>The number of routes to add.</para>
        /// <para>要添加的路由数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Routes")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _number_of_routes { get; set; }


        /// <summary>
        /// <para>Route Name Prefix</para>
        /// <para>A qualifier added to the title of every route layer item. For example, a route name prefix WeekdayRoute would be used as the starting text for every route’s name with Object ID appended to it.</para>
        /// <para>添加到每个路径图层项目标题中的限定符。例如，路由名称前缀 WeekdayRoute 将用作每个路由名称的起始文本，并在其后追加对象 ID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route Name Prefix")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _route_name_prefix { get; set; }


        /// <summary>
        /// <para>Start Depot Name</para>
        /// <para>The name of the starting depot for the route. If the Start Depot Name value is null, the route will begin from the first order assigned. Omitting the start depot is useful when the vehicle's starting location is unknown or irrelevant to your problem. However, when the Start Depot Name value is null, the End Depot Name value cannot also be null. Virtual start depots are not allowed if orders or depots are in multiple time zones.</para>
        /// <para>工艺路线的起始仓库的名称。如果 Start Depot Name 值为 null，则工艺路线将从分配的第一个订单开始。当车辆的起始位置未知或与您的问题无关时，省略起始站很有用。但是，当“起始仓库名称”值为 null 时，“结束仓库名称”值也不能为空。如果订单或仓库位于多个时区，则不允许使用虚拟起始仓库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Start Depot Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _start_depot_name { get; set; } = null;


        /// <summary>
        /// <para>End Depot Name</para>
        /// <para>The name of the ending depot for the route. If the End Depot Name value is null, the route will end at the last order assigned. When the End Depot Name value is null, the Start Depot Name value cannot also be null.</para>
        /// <para>路线的终点仓库的名称。如果 End Depot Name 值为 null，则工艺路线将在分配的最后一个订单处结束。当“结束仓库名称”值为空时，“开始仓库名称”值也不能为空。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("End Depot Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _end_depot_name { get; set; } = null;


        /// <summary>
        /// <para>Earliest Start Time</para>
        /// <para><xdoc>
        ///   <para>The earliest allowable start time for the route.</para>
        ///   <para>This parameter is used by the solver in conjunction with the time window of the starting depot, provided in the Depots layer by the TimeWindowStart field, for determining feasible route start times. This parameter has a default time-only value of 8:00:00 a.m., interpreted as 8:00:00 a.m. on the date given by the Default Date property of the analysis layer. If no value is specified, the default value is used.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>路线的最早允许开始时间。</para>
        ///   <para>求解器将此参数与起始车辆段的时间窗口结合使用（TimeWindowStart 字段在 Depots 图层中提供），以确定可行的路径开始时间。此参数的默认仅时间值为 8：00：00 a.m.，在分析图层的默认日期属性指定的日期解释为上午 8：00：00。如果未指定任何值，则使用默认值。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Earliest Start Time")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _earliest_start_time { get; set; } = null;


        /// <summary>
        /// <para>Latest Start Time</para>
        /// <para>The latest allowable start time for the route. This parameter has a default time-only value of 10:00:00 a.m., interpreted as 10:00:00 a.m. on the date provided by the Default Date property of the analysis layer. If no value is specified, the default value is used.</para>
        /// <para>路线的最晚允许开始时间。此参数的默认仅时间值为 10：00：00 a.m.，在分析图层的默认日期属性提供的日期解释为 10：00：00 a.m.。如果未指定任何值，则使用默认值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Latest Start Time")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _latest_start_time { get; set; } = null;


        /// <summary>
        /// <para>Max Order Count</para>
        /// <para>The maximum allowable number of orders on the route. The default value is 30. If no value is specified, the default value is used.</para>
        /// <para>工艺路线上允许的最大订单数。默认值为 30。如果未指定任何值，则使用默认值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Max Order Count")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _max_order_count { get; set; } = 30;


        /// <summary>
        /// <para>Capacities</para>
        /// <para>The maximum amount (volume, weight, quantity, and so on) that can be carried by the vehicle. A null value is the same as zero. A maximum of nine capacity fields are allowed, but use only the number necessary to model the needs of the vehicles.</para>
        /// <para>车辆可以携带的最大数量（体积、重量、数量等）。null 值与零相同。最多允许 9 个容量字段，但仅使用对车辆需求进行建模所需的数字。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Capacities")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _capacities { get; set; } = null;


        /// <summary>
        /// <para>Route Constraints</para>
        /// <para><xdoc>
        ///   <para>The constraints placed on routes to limit total time, total travel time, and total distance.
        ///   <bulletList>
        ///     <bullet_item>Max Total Time—The maximum allowable route duration. The route duration includes travel times as well as service and wait times at orders, depots, and breaks.  </bullet_item><para/>
        ///     <bullet_item>Max Total Travel Time—The maximum allowable travel time for the route. The travel time includes only the time spent driving on the network and does not include service or wait times. This field value can't be larger than the MaxTotalTime  field value.  </bullet_item><para/>
        ///     <bullet_item>Max Total Distance—The maximum allowable travel distance for the route.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>对路线施加的限制，以限制总时间、总行程时间和总距离。
        ///   <bulletList>
        ///     <bullet_item>最大总时间 - 允许的最大路径持续时间。路线持续时间包括旅行时间以及订单、仓库和休息时间的服务和等待时间。 </bullet_item><para/>
        ///     <bullet_item>最大总行程时间 - 路径允许的最长行程时间。旅行时间仅包括在网络上行驶的时间，不包括服务或等待时间。此字段值不能大于 MaxTotalTime 字段值。 </bullet_item><para/>
        ///     <bullet_item>最大总距离 - 路径的最大允许行驶距离。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route Constraints")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _route_constraints { get; set; } = null;


        /// <summary>
        /// <para>Costs</para>
        /// <para><xdoc>
        ///   <para>The costs incurred by the route in a VRP solution.</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>Fixed Cost—A fixed monetary cost that is incurred only if the route is used in a solution (that is, it has orders assigned to it).</bullet_item><para/>
        ///       <bullet_item>Cost Per Unit Time—The monetary cost incurred per unit of work time for the total route duration, including travel times and service and wait times at orders, depots, and breaks.</bullet_item><para/>
        ///       <bullet_item>Cost Per Unit Distance—The monetary cost incurred per unit of distance traveled for the route length (total travel distance).</bullet_item><para/>
        ///       <bullet_item>Overtime Start Time—The duration of regular work time before overtime computation begins.</bullet_item><para/>
        ///       <bullet_item>Cost Per Unit Overtime—The monetary cost incurred per time unit of overtime work. This field can contain null values; a null value indicates that the Cost Per Unit Overtime value is the same as the Cost Per Unit Time value.</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>VRP 解决方案中路由产生的成本。</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>固定成本 - 仅当在解决方案中使用路径（即，该路径已分配了订单）时才会产生的固定货币成本。</bullet_item><para/>
        ///       <bullet_item>每单位时间成本 - 总路线持续时间内每单位工作时间产生的货币成本，包括行程时间以及订单、仓库和休息点的服务和等待时间。</bullet_item><para/>
        ///       <bullet_item>每单位距离成本 - 对于路径长度（总行驶距离），每单位行驶距离产生的货币成本。</bullet_item><para/>
        ///       <bullet_item>加班开始时间 - 加班计算开始前的正常工作时间的持续时间。</bullet_item><para/>
        ///       <bullet_item>每单位加班成本 - 每单位时间加班产生的货币成本。此字段可以包含 null 值;null 值表示“每单位加班成本”值与“每单位时间成本”值相同。</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Costs")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _costs { get; set; } = null;


        /// <summary>
        /// <para>Additional Route Time</para>
        /// <para><xdoc>
        ///   <para>Additional route time options.
        ///   <bulletList>
        ///     <bullet_item>Start Depot Service Time—The service time at the starting depot. This can be used to model the time spent loading the vehicle.  </bullet_item><para/>
        ///     <bullet_item>End Depot Service Time—The service time at the ending depot. This can be used to model the time spent unloading the vehicle.  </bullet_item><para/>
        ///     <bullet_item>Arrive/Depart Delay—The amount of travel time needed to accelerate the vehicle to normal travel speeds, decelerate it to a stop, and move it off and on the network (for example, in and out of parking). By including an Arrive/Depart Delay value, the VRP solver is deterred from sending many routes to service physically coincident orders.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>其他路线时间选项。
        ///   <bulletList>
        ///     <bullet_item>起始仓库维修时间 - 起始仓库的服务时间。这可用于对装载车辆所花费的时间进行建模。 </bullet_item><para/>
        ///     <bullet_item>End Depot Service Time - 结束仓库的服务时间。这可用于对卸载车辆所花费的时间进行建模。 </bullet_item><para/>
        ///     <bullet_item>到达/离开延迟 - 将车辆加速到正常行驶速度、减速至停止以及将其移出网络（例如，进出停车场）所需的行驶时间。通过包含 Arrival/Depart Delay 值，VRP 求解器可以阻止发送许多路由来处理物理上重合的订单。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Additional Route Time")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _additional_route_time { get; set; } = null;


        /// <summary>
        /// <para>Append To Existing Routes</para>
        /// <para><xdoc>
        ///   <para>Specifies whether new routes will be appended to the existing routes attribute table. 
        ///   <bulletList>
        ///     <bullet_item>Checked—New routes will be appended to the existing set in the routes attribute table. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Existing routes will be deleted and replaced with new routes.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否将新路由追加到现有路由属性表中。
        ///   <bulletList>
        ///     <bullet_item>选中—新路径将追加到路径属性表中的现有集合中。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 将删除现有路径并将其替换为新路径。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Append To Existing Routes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _append_to_existing_routes_value _append_to_existing_routes { get; set; } = _append_to_existing_routes_value._true;

        public enum _append_to_existing_routes_value
        {
            /// <summary>
            /// <para>APPEND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("APPEND")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>CLEAR</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CLEAR")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Vehicle Routing Problem Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Vehicle Routing Problem Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_vrp_layer { get; set; }


        public AddVehicleRoutingProblemRoutes SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}